//新闻表
var Waterline = require('waterline');
var uuid = require('node-uuid');


module.exports = Waterline.Collection.extend({
    identity: 'prov_city_area', //数据集合的名字 在mysql叫表
    tableName: 'prov_city_area',
    connection: 'localMongo', //设定哪个连接
    schema: true, //是否强制模式
    autoCreatedAt: false, //不自动创建时间
    autoUpdatedAt: false, //不自动更新时间
    attributes: {
        id: {
            type: 'string',
            required: true,
            primaryKey: true,
            defaultsTo: function() {
                return uuid.v4();
            }
        },
        value: {
            type: 'number',
            required: true
        },
        babel: {
            type: 'string',
            required: true
        },
        child: {
            type: 'array',
            required: true
        }
    }
});